#ifndef __FRAME_HPP
#define __FRAME_HPP

#include "common_include.hpp"
#include <string>

namespace visionhw {

class Frame
{
public:
    Frame();
    ~Frame(){}
    void setInputFile(const std::string& jpeg, const std::string& depth);
    void setInputFile(const std::string& ply);
    void setCameraConfig(const Json::Value& intrinsics);
    void calcCloud();

    inline CloudType::Ptr getCloud() {return _cloud;}
    inline CloudType getCloneCloud() {return *_cloud;}
    inline const bool is_ply() {return _is_ply;}

private:
    void _computeXYZandInsert(int r, int c);

private: 
    bool _is_ply = false;
    CloudType::Ptr _cloud;
    cv::Mat _jpeg_mat;
    cv::Mat _depth_mat;

    double depth_scale;
    double ppx;
    double ppy;
    double fx;
    double fy;
};

}

#endif